pub mod com;
pub mod variant;
pub mod catia;

// Re-exports for ergonomic API
pub use crate::com::{ComApartment, ComObject, com_create};
pub use crate::variant::{variant_empty, variant_bstr, variant_i4, variant_r8, variant_bool};
pub use crate::catia::CatiaApp;

// Macros: simplify get/put/call on ComObject
#[macro_export]
macro_rules! com_get {
    ($obj:expr, $name:literal) => {{
        $obj.get($name)
    }};
}

#[macro_export]
macro_rules! com_put {
    ($obj:expr, $name:literal, $val:expr) => {{
        $obj.put($name, $val)
    }};
}

#[macro_export]
macro_rules! com_call {
    ($obj:expr, $name:literal $(, $args:expr )* ) => {{
        let mut v = Vec::new();
        $( v.push($args); )*
        $obj.call($name, v)
    }};
}